<?php
/*
* Description: 	Used with the Photo Concept Theme to add an interface to Flickr.
*				This file is to create the metabox contents.
*/
require_once (dirname(__FILE__).'/prose_flickr_calls.php');
?>

<div class="inside">
	<p><strong>Locate Sets by?</strong></p>
	<form>
		<label for="username">Username</label> 
		<input id="username" maxlength="50" size="21" name="flickr_username" value="<?php echo $prose_flickr_username ?>"/>
		<br />
	<!--
		<input id="email" type="radio" name="flickr_lookup" value="eMail" />
		<label for="email">eMail</label> 
		<input id="email" maxlength="50" size="21" name="flickr_api" value="<?php echo $prose_email ?>"/>
	-->
		<?php
			$prose_flickr_user_id = prose_flickr_get_user_id_username($prose_flickr_api,$prose_flickr_secret,$prose_flickr_username);
//			$prose_flickr_user_id = prose_flickr_get_user_id_username($prose_flickr_api,$prose_flickr_secret,$prose_username);
		?>
	</form>

	<?php
		$prose_flickr_photosets = prose_flickr_get_user_photosets($prose_flickr_api, $prose_flickr_user_id);
	?>
	
	<p><strong>Your Available Sets</strong></p> 
    <select name="prose_flickr_photoset">
        <?php
            foreach($prose_flickr_photosets as $set){
                $selected = selected($set['id'], $prose_flickr_set, false);
		echo("<option value=" . $set['id'] . " " . $selected . ">" . $set['title'] . "</option>");
            }
        ?>
    </select>
</div>